const requset = require("../service/requset");

/**
 *[getGroupInfo 获取组织基本信息]
 *
 * @param   {[type]}  loginOrId  [loginOrId description]
 *
 * @return  {[type]}             [return description]
 */
function getGroupInfo(loginOrId) {
  return requset({
    method: "get",
    url: `/users/${loginOrId}/groups `
  });
}
/**
 * [getGroupInfo 获取某个组织的详细信息]
 *
 * @param   {[type]}  loginOrId  [loginOrId description]
 *
 * @return  {[type]}             [return description]
 */
function getGroupDetails(loginOrId) {
  return requset({
    method: "get",
    url: `/groups/${loginOrId}`
  });
}

module.exports = {
  getGroupInfo,
  getGroupDetails
}